<?php use_stylesheet('prodpar.css') //load css    ?>
<?php use_stylesheet('hoverTables.css') //load css    ?>
<!--PartTable-->
<div id="parts" class="table_div">
    <table>
        <tr class="bold head">
            <td width="8%">Product No.</td>
            <td width="15%">Name</td>
            <td width="15%">Type</td>
            <td>Stock</td>
            <td>Location</td>
            <td>Minimum</td>
            <td>Reserved</td>
            <td></td>
            <td width="5%">Total</td>
            <td width="35px"></td>
            <td width="35px"></td>
        </tr>
        <?php foreach ($products as $i=>$product): ?>
            <tr class="table_hov <?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
                <td><?php echo $product->getProductNumber() ?></td>
                <td><?php echo $product->getName() ?></td>
                <td><?php echo $product->getType() ?></td>
                <td><?php echo $product->getStock() ?></td>
                <td><?php echo $product->getLocation() ?></td>
                <td><?php echo $product->getMinStock() ?></td>
                <td><?php echo $product->getReserved() ?></td>
                <td></td>
                <td><?php echo ($product->getStock() + $product->getReserved()) ?></td>
                <td></td>
                <td style="text-align: center;"><a href="<?php echo url_for('stock/showHistoryProduct?id='.$product->getId()) ?>"><img src="<?php echo image_path('Buttons/bt_history.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_history_hov.png') ?>';"  onmouseout="this.src='<?php echo image_path('Buttons/bt_history.png') ?>';" title="History"/></a></td>           
            </tr>
<?php endforeach; ?>
    </table>
</div>
